home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / wsc4c10.zip / MENU.C < prev    next >
Text File  |  1996-09-08  |  1KB  |  52 lines

  1. /*** menu.c ***/
  2.  
  3. #include "windows.h"
  4. #include "wsc.h"
  5.  
  6. #include "menu.h"
  7.  
  8. extern HWND hMainWnd;
  9. extern int FatalFlag;
  10. extern int OnLineFlag;
  11. extern char Temp[256];
  12.  
  13. /*** PUBLIC ***/
  14.  
  15. void CheckTheMenu(int MenuID)
  16. {HMENU hMenu;
  17.  if(MenuID)
  18.  hMenu = GetMenu(hMainWnd);
  19.  CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_CHECKED);
  20. }
  21.  
  22. void UncheckTheMenu(int MenuID)
  23. {HMENU hMenu;
  24.  hMenu = GetMenu(hMainWnd);
  25.  CheckMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_UNCHECKED);
  26. }
  27.  
  28. void EnableTheMenu(int MenuID)
  29. {HMENU hMenu;
  30.  hMenu = GetMenu(hMainWnd);
  31.  EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_ENABLED);
  32. }
  33.  
  34. void DisableTheMenu(int MenuID)
  35. {HMENU hMenu;
  36.  hMenu = GetMenu(hMainWnd);
  37.  EnableMenuItem(hMenu,MenuID,MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
  38. }
  39.  
  40. void EnableMenuBarItem(int nPos)
  41. {HMENU hMenu;
  42.  hMenu = GetMenu(hMainWnd);
  43.  EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_ENABLED);
  44. }
  45.  
  46. void DisableMenuBarItem(int nPos)
  47. {HMENU hMenu;
  48.  hMenu = GetMenu(hMainWnd);
  49.  EnableMenuItem(hMenu,nPos,MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
  50. }
  51.  
  52.